Skip to content

FEAT Persist component identifiers as normalized, content-addressed graphs#2164

Open
behnam-o wants to merge 24 commits into
microsoft:mainfrom
behnam-o:persist-identifiers
Open

FEAT Persist component identifiers as normalized, content-addressed graphs#2164
behnam-o wants to merge 24 commits into
microsoft:mainfrom
behnam-o:persist-identifiers

Conversation

@behnam-o

@behnam-o behnam-o commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

This is phase 7 of this proposal: PyRIT Unified Registry — Design & Rationale

Adds normalized persistence for target, scorer, converter, scenario, seed, and attack identifiers.

  • Stores identifiers once by content hash, with ordered relationships for nested component graphs.
  • Adds foreign-key links from conversations, prompts, scores, scenario results, and attack results.
  • Retains existing identifier JSON as the read source while dual-writing normalized rows for backward compatibility.
  • Includes a best-effort Alembic backfill that leaves links nullable when legacy data is malformed.
  • Centralizes graph persistence in MemoryInterface so SQLite and Azure SQL share the same behavior.
  • Adds coverage for deduplication, graph relationships, dual writes, and migration backfills.

@rlundeen2

This comment was marked as resolved.

Comment thread pyrit/memory/memory_interface.py
@behnam-o behnam-o changed the title [DRAFT] Persist identifiers in DB FEAT Persist component identifiers as normalized, content-addressed graphs Jul 14, 2026
@behnam-o behnam-o marked this pull request as ready for review July 14, 2026 19:25
@rlundeen2 rlundeen2 self-assigned this Jul 14, 2026
Comment thread pyrit/memory/memory_models.py
Comment thread pyrit/memory/memory_interface.py Outdated
Comment thread pyrit/memory/memory_models.py Outdated

@rlundeen2 rlundeen2 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If comments are addressed. But lmk if you disagree and we can work it out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants